﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PortalParts/PageMorePartyRepresentative.Master" AutoEventWireup="true" CodeBehind="PartyRepresentativeInfoDetail.aspx.cs" Inherits="ZHDJ.Web.Portal.PartyRepresentative.PartyRepresentativeInfoDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../../Resource/js/Nailthumb/jquery.nailthumb.1.1.min.css" rel="stylesheet" />

    <script src="../../Resource/js/Nailthumb/jquery.nailthumb.1.1.min.js"></script>
    <script src="../../Resource/js/default/jquery.tmpl.min.js"></script>
    <script src="../../Resource/js/knockout/knockout-3.4.0.js"></script>
    <script src="../../Resource/js/jquery/jquery.pagination.js"></script>
    <script>
        var pageSize = 10, isBind = false;
        var initImgSize = function () {
            $('.nailthumb-container').each(function (i, n) {
                $(n).nailthumb({ width: 122, height: 140, method: 'resize', fitDirection: 'center center' });
            });

        }
        var paginationPara = {
            num_edge_entries: 1, //边缘页数
            num_display_entries: 4, //主体页数
            callback: pageselectCallback,
            items_per_page: pageSize, //每页显示1项
            prev_text: "上一页",
            next_text: "下一页",
            link_to: "javascript:void(0);"
        }
        var ViewModel = {
            qdate: ko.observableArray(),
            loadContacts: function (pageIndex) {
                $.get("PartyRepresentativeInfoDetail.aspx", {
                    PageIndex: pageIndex + 1,
                    PageSize: pageSize,
                    id: $("#ctl00_ContentPlaceHolder1_hdRepresentativeID").val(),
                    r: (new Date()).getTime()
                },
                function (data) {
                    var ss = eval("(" + data + ")");

                    ViewModel.qdate(eval("(" + data + ")"));
                });
            }
        }

        function initPage() {
            $.get("PartyRepresentativeInfoDetail.aspx", { DataCount: 1, id: $("#ctl00_ContentPlaceHolder1_hdRepresentativeID").val(), r: (new Date()).getTime() },
                function (data) {
                    var totalCount = parseInt(data);
                    if (totalCount == 0) {
                        $("#trnonedata").show();
                    }
                    $("#pagination").pagination(totalCount, paginationPara);
                });
        }
        function pageselectCallback(pageIndex, jq) {
            ViewModel.loadContacts(pageIndex);
            if (!isBind) {
                ko.applyBindings(ViewModel);
                isBind = true;
            }

        }
        $(function () {
            initImgSize();
            initPage();
        });



    </script>
    <script id="myTemplate" type="text/x-jquery-tmpl">
        <tr class="tr_a">
            <td class="td1"><a href="MeetingDetail.aspx?id=${ID}" target="_blank">${Title2}</a></td>
            <td class="td2">${BeginTime2}</td>
        </tr>
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:HiddenField ID="hdRepresentativeID" runat="server" />
    <div class="ny_box" style="">
        <div class="cztable">
            <table class="table_b" border="0" cellspacing="0" cellpadding="0" style="background: #fff;">
                <tr class="tr_b ">
                    <td class=" tdbar" colspan="3">
                        <h5>党代表详细信息</h5>
                    </td>
                </tr>
                <tr class="tr_b">
                    <th class="th_b" rowspan="4" style="width: 130px;border-right: solid 1px #f7f7f7;">
                        <div class="nailthumb-container">            
                            <asp:Image runat="server"  ID="imgUser" Width="122px" Height="140px"/>
                        </div>
                    </th>
                    <th class="th_b" style="width: 100px">姓名：</th>
                    <td class="td_b">
                        <asp:Literal runat="server" ID="litUserName"></asp:Literal>
                    </td>
                </tr>
                <tr class="tr_b">
                    <th class="th_b">职务：</th>
                    <td class="td_b">
                        <asp:Literal runat="server" ID="litPost"></asp:Literal></td>
                </tr>
                <tr class="tr_b">
                    <th class="th_b">所属代表团：</th>
                    <td class="td_b">
                        <asp:Literal runat="server" ID="litStudio"></asp:Literal></td>
                </tr>
                <tr class="tr_b">
                    <th class="th_b">操作：</th>
                    <td class="td_b" style="text-align: center;padding: 10px 140px;">
                        <asp:Literal runat="server" ID="litOp"></asp:Literal>
                    </td>
                </tr>
            </table>
        </div>
        <div class="cztable" style="margin-top: 20px;">
            <table class="table_a" border="0" cellspacing="0" cellpadding="0">
                <tr class="tr_b ">
                    <td class="tdbar" style="border-top: #ccc solid 0px; border-left: #ccc solid 0px;" colspan="2">
                        <h5>党代表接访排期</h5>
                    </td>
                </tr>
                <!-- ko template: { name: 'myTemplate', foreach: qdate} -->
                <!-- /ko -->
                 <tr style="display: none" id="trnonedata" class="tr_a">
                    <td class="td2" style="text-align: center" colspan="4">无数据
                    </td>
                </tr>
            </table>
            <div class="pagination">
                <div id="pagination">
                </div>
            </div>
        </div>
    </div>

</asp:Content>
